<!-- 个人信息页面（名片页面） -->
<template>
  <view class="main">
    <view class="top_tou">
      <view class="left_" @tap="handleTui">
        <image
          src="../../images/circle/zuojiantou.png"
          mode="aspectFill"
        ></image>
      </view>
      <view class="center_"> 个人名片</view>
      <view class="right_"></view>
    </view>

    <view class="top">
      <!-- <view class="left" @tap="handfan">
		<image src="../../imges/left.png" mode="aspectFill"></image>
		<text>个人名片</text>
	  </view> -->
      <!-- 内容部分 -->
      <view class="content">
        <!-- <view class="xiaoxi" @tap="goMask">
					<image src="../../imges/faxiaoxi.png" mode="aspectFill"></image>
				</view> -->
        <view class="one">
          <view class="shang">
            <view class="left">
              <image
                :src="cardData.avatarUrl"
                mode="aspectFill"
                class="image"
              ></image>
              <view class="dengji"> V{{ cardData.memberLevel }} </view>
              <image
                src="../../imges/nvsheng.png"
                mode="aspectFill"
                class="xing"
                v-if="cardData.sex == 2"
              ></image>
              <image
                src="../../imges/nansheng.png"
                mode="aspectFill"
                class="xing"
                v-if="cardData.sex == 1"
              ></image>
            </view>
            <view class="right">
              <view class="name">
                {{ cardData.realName }}
              </view>
              <view class="firm">
                {{ cardData.company }}
              </view>
              <view class="zhiwei">
                {{ cardData.post }}
              </view>
            </view>
          </view>
          <view class="row">
            <image
              src="../../imges/dianhua.png"
              mode="aspectFill"
              class="img1"
            ></image>
            <view class="text">
              手机 :<text
                :style="
                  telphone(cardData.telphone) != '暂未设置'
                    ? { color: '#333333' }
                    : { color: '#999999' }
                "
                >{{ telphone(cardData.telphone) }}</text
              >
              <text
                @tap="boHao(cardData.telphone)"
                v-if="isPhone && type != 1 && id != userid"
                >拨打</text
              >
            </view>
          </view>
          <view class="row">
            <image
              src="../../imges/chengshi.png"
              mode="aspectFill"
              class="img2"
            ></image>
            <view class="text">
              城市 :
              <text v-if="cardData.address">{{ cardData.address }}</text>
              <text v-else style="color: #999">暂未设置</text>
            </view>
          </view>
          <view class="row">
            <image
              src="../../imges/youxiang.png"
              mode="aspectFill"
              class="img3"
            ></image>
            <view class="text">
              邮箱 :
              <text v-if="cardData.mail">{{ cardData.mail }}</text>
              <text v-else style="color: #999">暂未设置</text>
            </view>
          </view>

          <view class="zhankai" v-if="!is_more" @tap="lookMore">
            <image src="../../imges/xiam.png" mode="aspectFill"></image>
          </view>

          <view class="zhankai" v-if="is_more" @tap="nolookMore">
            <image src="../../imges/shangm.png" mode="aspectFill"></image>
          </view>

          <view class="row row1" v-if="is_more">
            <image
              src="../../imges/shengri.png"
              mode="aspectFill"
              class="img4"
            ></image>
            <view class="text">
              生日 :
              <text v-if="cardData.birthday">{{
                cardData.birthday.substring(0, 10)
              }}</text>
              <text v-else style="color: #999">暂未设置</text>
            </view>
          </view>

          <view class="row2" v-if="is_more">
            <view class="img">
              <image src="../../imges/jianjie.png" mode="aspectFill"></image>
              <text>简介 :</text>
            </view>
            <view class="text">
              <text v-if="cardData.selfIntroduction" style="color: #2168eb">{{
                cardData.selfIntroduction
              }}</text>
              <text v-else style="color: #999">暂未设置</text>
            </view>
          </view>

          <view class="footer_">
            <view class="left">
              <image src="../../imges/renmai.png" mode="aspectFill"></image>
              <text>人脉 &nbsp;&nbsp;{{ cardData.contactsNUmber }}</text>
            </view>
            <view class="right">
              <image src="../../imges/huoyue.png" mode="aspectFill"></image>
              <text>活跃度&nbsp;&nbsp;{{ cardData.calorificValue }}</text>
            </view>
          </view>
        </view>
      </view>
    </view>
    <view
      :class="[
        is_more
          ? 'duoList' + ' ' + duoList(cardData.selfIntroduction)
          : 'duoList',
      ]"
    >
      <view class="content1">
        <view class="xiding">
          <view class="tab">
            <view
              :class="[current == index ? 'isactive' : '']"
              v-for="(item, index) in tabList"
              @tap="qiehuan(index)"
            >
              {{ item }}
            </view>
          </view>
          <text
            class="active"
            :style="{ 'margin-left': tabMargin }"
            v-if="current != 2"
          ></text>
          <text
            class="active"
            style="margin-left: 295rpx"
            v-if="current == 2"
          ></text>

          <navigator
            :url="'/pages/per_center/setupInformation?id=' + userid"
            hover-class="none"
            class="shezhi"
            v-if="type == 1 || id == userid"
          >
            设置 >
          </navigator>
        </view>
        <swiper
          class="swiper"
          :style="{ height: dongHeight }"
          :indicator-dots="indicatorDots"
          :autoplay="autoplay"
          :interval="interval"
          :duration="duration"
          :current="swiperIndex"
          @change="change"
        >
          <swiper-item>
            <!-- ios展示 -->
            <view
              class=""
              v-if="qyhData.length > 0 && openApp.phone == 'ios'"
              style="padding: 10rpx 0"
            >
              <view
                class="qz"
                v-for="(item, index) in qyhData"
                :key="index"
                @tap="goMask(2, item.orgId)"
              >
                <view class="left">
                  <image :src="item.orgUrl" mode="aspectFill"></image>
                </view>
                <view class="right">
                  <view class="title">
                    {{ item.orgName }}
                  </view>
                  <view class="redu">
                    热度值 {{ item.calorificValue }} 粉丝 {{ item.fansCount }}
                  </view>
                </view>
              </view>
            </view>
            <!-- 安卓机展示 -->
            <view
              class=""
              v-if="
                qyhData.length > 0 &&
                openApp.iswx == 'wx' &&
                openApp.phone == 'Android'
              "
              style="padding: 10rpx 0"
            >
              <view class="qz" v-for="(item, index) in qyhData" :key="index">
                <view class="left">
                  <image :src="item.orgUrl" mode="aspectFill"></image>
                </view>
                <view class="right">
                  <view class="title">
                    {{ item.orgName }}
                  </view>
                  <view class="redu">
                    热度值 {{ item.calorificValue }} 粉丝 {{ item.fansCount }}
                  </view>
                </view>
                <view class="mc">
                  <wx-open-launch-app
                    id="launch-btn"
                    appid="wx8737e94836340f56"
                    @error="openApp.handleErrorFn"
                    @launch="openApp.handleLaunchFn"
                    :extinfo="
                      'yqlw://yilaiwang.com/openDetail?jumpType=6&serviceId=' +
                      item.orgId +
                      '&type=7&orgId=&content='
                    "
                  >
                    <script type="text/wxtag-template">
                      <style>
                       .toapp{
                      	 display: block;
                      	 width: 200px;
                      	 height: 99px;
                       }
                      </style>
                        <view class="toapp"></view>
                    </script>
                  </wx-open-launch-app>
                </view>
              </view>
            </view>
            <view class="wu_Huo" v-if="qyhData.length < 1">
              <image src="../../imges/zwqyh.png" mode="aspectFill"></image>
              <text>暂无企业号</text>
            </view>
          </swiper-item>
          <swiper-item>
            <!-- 商协会ios展示 -->
            <view
              class=""
              v-if="sxhData.length > 0 && openApp.phone == 'ios'"
              style="padding: 10rpx 0"
            >
              <view
                class="qz"
                v-for="(item, index) in sxhData"
                :key="index"
                @tap="goMask(3, item.orgId)"
              >
                <view class="left">
                  <image :src="item.orgUrl" mode="aspectFill"></image>
                </view>
                <view class="right">
                  <view class="title">
                    {{ item.orgName }}
                  </view>
                  <view class="redu">
                    热度值 {{ item.calorificValue }} 粉丝 {{ item.fansCount }}
                  </view>
                </view>
              </view>
            </view>
            <!-- 商协会安卓展示 -->
            <view
              class=""
              v-if="
                sxhData.length > 0 &&
                openApp.iswx == 'wx' &&
                openApp.phone == 'Android'
              "
              style="padding: 10rpx 0"
            >
              <view class="qz" v-for="(item, index) in sxhData" :key="index">
                <view class="left">
                  <image :src="item.orgUrl" mode="aspectFill"></image>
                </view>
                <view class="right">
                  <view class="title">
                    {{ item.orgName }}
                  </view>
                  <view class="redu">
                    热度值 {{ item.calorificValue }} 粉丝 {{ item.fansCount }}
                  </view>
                </view>
                <view class="mc">
                  <wx-open-launch-app
                    id="launch-btn"
                    appid="wx8737e94836340f56"
                    @error="openApp.handleErrorFn"
                    @launch="openApp.handleLaunchFn"
                    :extinfo="
                      'yqlw://yilaiwang.com/openDetail?jumpType=6&serviceId=' +
                      item.orgId +
                      '&type=1&orgId=&content='
                    "
                  >
                    <script type="text/wxtag-template">
                      <style>
                      	 .toapp{
                      		 display: block;
                      		 width: 200px;
                      		 height: 99px;
                      	 }
                       </style>
                      <view class="toapp"></view>
                    </script>
                  </wx-open-launch-app>
                </view>
              </view>
            </view>
            <view class="wu_Huo" v-if="sxhData.length < 1">
              <image src="../../imges/zwsxh.png" mode="aspectFill"></image>
              <text>暂无商协会</text>
            </view>
          </swiper-item>
          <swiper-item>
            <view class="" v-if="qzData.length > 0" style="padding: 10rpx 0">
              <view
                class="qz"
                v-for="(item, index) in qzData"
                :key="index"
                @tap="quanzi(item.orgId)"
              >
                <view class="left">
                  <image :src="item.orgUrl" mode="aspectFill"></image>
                </view>
                <view class="right">
                  <view class="title">
                    {{ item.orgName }}
                  </view>
                  <view class="redu">
                    成员 {{ item.peopleNumber }} 微贴 {{ item.postNumber }}
                  </view>
                </view>
              </view>
            </view>
            <view class="wu_Huo" v-if="qzData.length < 1">
              <image src="../../imges/zwqz.png" mode="aspectFill"></image>
              <text>暂无圈子</text>
            </view>
          </swiper-item>
        </swiper>
      </view>
    </view>

    <view class="foot_btn" v-if="type == 1 || id == userid">
      <view class="xian"></view>
      <navigator
        url="/pages/per_center/editData"
        hover-class="none"
        class="btn"
      >
        <view class="btn_1 btn_2 btn5_"> 编辑名片 </view>
      </navigator>
    </view>
    <view class="foot_btn" v-else>
      <view class="xian"></view>
      <view class="btn">
        <view
          :class="[
            cardData.isExchangeCards == 0 ? 'btn_ btn3_' : 'btn_ btn3_ btn4_',
          ]"
          v-if="cardData.isCollection == 0"
          @tap="shoucang"
        >
          收藏名片
        </view>
        <view
          :class="[cardData.isExchangeCards == 0 ? 'btn_' : 'btn_ btn4_']"
          v-if="cardData.isCollection == 1"
          @tap="quxiaoSC"
        >
          取消收藏
        </view>
        <view
          class="btn_1"
          v-if="cardData.isExchangeCards == 0"
          @tap="jiaohuan"
        >
          交换名片
        </view>
      </view>
    </view>

    <view class="zheZhao" @tap="quMask" v-if="is_mask">
      <view class="modal">
        <view class="header"> 提示 </view>
        <view class="text">
          {{ tishi_ }}
        </view>
        <view class="btn_">
          <view class="left" @tap="quMask"> 取消 </view>
          <view>
            <uni-link
              class="right"
              href="https://www.yiqilaiwang.com/h5openapp2/app.html"
              text="确认"
              showUnderLine="false"
              color="#0476FC"
            >
            </uni-link>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import request from "../../utils/request.js";
import "../../utils/toApp.js";
var jweixin = require("jweixin-module"); //配置
import uniLink from "@/module/uni-link/uni-link.vue";
export default {
  data() {
    return {
      is_more: false, //是否查看更多
      is_mask: false, //去app遮罩
      tishi_: "是否下载APP，与他开启聊天？",
      cardData: {},
      qyhData: [],
      sxhData: [],
      qzData: [],
      swiperIndex: "",
      dongHeight: "400rpx",
      tabMargin: "25rpx",
      current: "",
      id: "",
      userid: "",
      type: "",
      indicatorDots: false,
      autoplay: false,
      interval: 2000,
      duration: 500,
      tabList: ["企业号", "商协会号", "圈子"],
      exchange: true,
      isPhone: false,
      goAdd: false,
      isShare: false,
    };
  },
  components: {
    uniLink,
  },
  onShow() {
    this.usercard();
    this.card();
    this.qyhList();
    this.sxhList();
    this.qzList();
    this.configWeiXin1();
  },
  onLoad(option) {
    this.id = option.id;
    this.type = option.type;
    if (option.isShare == 1) {
      this.isShare = true;
    }
  },
  computed: {
    duoList() {
      return function (value) {
        if (value.length > 0 && value.length < 40) {
          return "duoList1";
        } else if (value.length > 40) {
          return "duoList2";
        } else {
          return "duoList1";
        }
      };
    },
    telphone() {
      return function (value) {
        let str = "";
        if (value) {
          str = value.substring(0, 3);
        }

        if (str == "000" || value == "") {
          return "暂未设置";
        } else {
          return value;
        }
      };
    },
  },
  methods: {
    configWeiXin1() {
      //获取公众号配置
      request({
        //获取appid
        url: "h5/login/jsapiSignature/",
        method: "POST",
        header: {
          "Content-Type": "application/json",
          "api-client": "72e0fee8172411ea995200163e05ff66",
          "api-version": this.globalData.apiVersion,
          "Source-Type": 7,
        },
        data: {
          url: window.location.href.split("#")[0], //后台通过域名进行授权
        },
      }).then((res) => {
        if (res.statusCode == 200) {
          //获取成功
          jweixin.config({
            debug: false, // 开启调试模式，发布的时候改为false
            appId: res.data.appId, // 必填，公众号的唯一标识
            timestamp: res.data.timestamp, // 必填，生成签名的时间戳
            nonceStr: res.data.nonceStr, // 必填，生成签名的随机串
            signature: res.data.signature, // 必填，签名
            jsApiList: ["updateAppMessageShareData", "updateTimelineShareData"], // 必填，需要使用的JS接口列表
            openTagList: ["wx-open-launch-app"],
          });
          jweixin.ready(function () {});
        } else {
          uni.showToast({
            title: res.data.msg,
            duration: 2000,
            icon: "none",
          });
        }
      });
    },
    quanzi(id) {
      uni.navigateTo({
        url: "/pages/circle/index?id=" + id,
      });
    },
    boHao(item) {
      //拨号
      uni.makePhoneCall({
        phoneNumber: item, //仅为示例
      });
    },
    shoucang() {
      let token = uni.getStorageSync("token");
      const that = this;
      if (!token) {
        uni.showToast({
          title: "请授权登录再操作！",
          duration: 2000,
          icon: "none",
        });
        setTimeout(() => {
          uni.navigateTo({
            url: "/pages/index/index",
          });
        }, 2000);
      } else {
        request({
          url: "h5/home/addCollections?uid=",
          method: "POST",
          header: {
            "content-type": "application/json;charset=UTF-8",
            "api-client": "72e0fee8172411ea995200163e05ff66",
            "api-version": this.globalData.apiVersion,
            "Source-Type": 7,
            token: token,
          },
          data: {
            type: 9,
            collectionId: this.id,
          },
        }).then((res) => {
          if (res.data.code == 200) {
            that.card();
            uni.showToast({
              title: "收藏成功",
              duration: 2000,
              icon: "none",
            });
          } else if (res.data.code == 401) {
            uni.showToast({
              title: "登录失效，请重新授权登录！",
              duration: 2000,
              icon: "none",
            });
            setTimeout(() => {
              uni.navigateTo({
                url: "/pages/index/index",
              });
            }, 2000);
          } else {
            uni.showToast({
              title: res.data.msg,
              duration: 2000,
              icon: "none",
            });
          }
        });
      }
    },
    handleTui() {
      let ios = uni.getStorageSync("ios");
      if (this.goAdd || ios == 1) {
        uni.removeStorageSync("ios");
        window.history.go(-2);
        // console.log('111111111111111111111')
      } else if (this.isShare) {
        uni.redirectTo({
          url: "/pages/index/index",
        });
      } else {
        // window.history.go(-2);
        window.history.back();
        // console.log('22222222222222222222222')
      }
    },
    quxiaoSC() {
      uni.showModal({
        title: "提示",
        content: "是否取消该条收藏",
        confirmColor: "#000000",
        cancelColor: "#007aff",
        cancelText: "再想想",
        success: (e) => {
          if (e.confirm) {
            let token = uni.getStorageSync("token");
            const that = this;
            if (!token) {
              uni.showToast({
                title: "请授权登录再操作！",
                duration: 2000,
                icon: "none",
              });
              setTimeout(() => {
                uni.navigateTo({
                  url: "/pages/index/index",
                });
              }, 2000);
            } else {
              request({
                url: "h5/home/removeCollections?uid=",
                method: "POST",
                header: {
                  "content-type": "application/json;charset=UTF-8",
                  "api-client": "72e0fee8172411ea995200163e05ff66",
                  "api-version": this.globalData.apiVersion,
                  "Source-Type": 7,
                  token: token,
                },
                data: {
                  type: 9,
                  collectionId: this.id,
                },
              }).then((res) => {
                if (res.data.code == 200) {
                  uni.showToast({
                    title: "取消收藏成功",
                    duration: 2000,
                    icon: "none",
                  });
                  that.card();
                } else if (res.data.code == 401) {
                  uni.showToast({
                    title: "登录失效，请重新授权登录！",
                    duration: 2000,
                    icon: "none",
                  });
                  setTimeout(() => {
                    uni.navigateTo({
                      url: "/pages/index/index",
                    });
                  }, 2000);
                } else {
                  uni.showToast({
                    title: res.data.msg,
                    duration: 2000,
                    icon: "none",
                  });
                }
              });
            }
          }
        },
      });
    },
    jiaohuan() {
      if (this.exchange == false) {
        uni.showToast({
          title: "已提交申请，请勿重复操作",
          duration: 2000,
          icon: "none",
        });
        return false;
      }
      let token = uni.getStorageSync("token");
      const that = this;
      if (!token) {
        uni.showToast({
          title: "请授权登录再操作！",
          duration: 2000,
          icon: "none",
        });
        setTimeout(() => {
          uni.navigateTo({
            url: "/pages/index/index",
          });
        }, 2000);
      } else {
        request({
          url: "h5/userInformation/userExchangeCard",
          method: "POST",
          header: {
            "content-type": "application/json;charset=UTF-8",
            "api-client": "72e0fee8172411ea995200163e05ff66",
            "api-version": this.globalData.apiVersion,
            "Source-Type": 7,
            token: token,
          },
          data: {
            viewUid: this.id,
          },
        }).then((res) => {
          if (res.data.code == 200) {
            this.exchange = false;
            this.card();
            uni.showToast({
              title: "提交成功",
              duration: 2000,
              icon: "none",
            });
          } else if (res.data.code == 401) {
            uni.showToast({
              title: "登录失效，请重新授权登录！",
              duration: 2000,
              icon: "none",
            });
            setTimeout(() => {
              uni.navigateTo({
                url: "/pages/index/index",
              });
            }, 2000);
          } else {
            uni.showToast({
              title: res.data.msg,
              duration: 2000,
              icon: "none",
            });
          }
        });
      }
    },
    qiehuan(index) {
      this.swiperIndex = index;
      if (index == 0) {
        this.tabMargin = index * 150 + 25 + "rpx";
      } else if (index == 1) {
        this.tabMargin = index * 150 + 25 + "rpx";
      } else if (index == 2) {
        this.tabMargin = index * 150 + 18 + "rpx";
      }
      if (index == 0 && this.qyhData.length > 0) {
        this.dongHeight = this.qyhData.length * 218 + "rpx";
      } else if (index == 1 && this.sxhData.length > 0) {
        this.dongHeight = this.sxhData.length * 218 + "rpx";
      } else if (index == 2 && this.qzData.length > 0) {
        this.dongHeight = this.qzData.length * 218 + "rpx";
      } else {
        this.dongHeight = "400rpx";
      }
    },
    change(e) {
      this.swiperIndex = e.detail.current;
      this.current = e.detail.current;
      if (e.detail.current == 0) {
        this.tabMargin = e.detail.current * 150 + 25 + "rpx";
      } else if (e.detail.current == 1) {
        this.tabMargin = e.detail.current * 150 + 25 + "rpx";
      } else if (e.detail.current == 2) {
        this.tabMargin = e.detail.current * 150 + 18 + "rpx";
      }
      if (e.detail.current == 0 && this.qyhData.length > 0) {
        this.dongHeight = this.qyhData.length * 218 + "rpx";
      } else if (e.detail.current == 1 && this.sxhData.length > 0) {
        this.dongHeight = this.sxhData.length * 218 + "rpx";
      } else if (e.detail.current == 2 && this.qzData.length > 0) {
        this.dongHeight = this.qzData.length * 218 + "rpx";
      } else {
        this.dongHeight = "400rpx";
      }
    },
    usercard() {
      let token = uni.getStorageSync("token");
      const that = this;
      if (!token) {
        uni.showToast({
          title: "请授权登录再操作！",
          duration: 2000,
          icon: "none",
        });
        setTimeout(() => {
          uni.navigateTo({
            url: "/pages/index/index",
          });
        }, 2000);
      } else {
        request({
          url: "h5/userInformation/getNewOtherBusinessCard?",
          method: "POST",
          header: {
            "content-type": "application/json;charset=UTF-8",
            "api-client": "72e0fee8172411ea995200163e05ff66",
            "api-version": this.globalData.apiVersion,
            "Source-Type": 7,
            token: token,
          },
          data: {
            viewUid: "",
          },
        }).then((res) => {
          if (res.data.code == 200) {
            that.userid = res.data.data.id;
          } else if (res.data.code == 401) {
            uni.showToast({
              title: "登录失效，请重新授权登录！",
              duration: 2000,
              icon: "none",
            });
            setTimeout(() => {
              uni.navigateTo({
                url: "/pages/index/index",
              });
            }, 2000);
          } else {
            uni.showToast({
              title: res.data.msg,
              duration: 2000,
              icon: "none",
            });
          }
        });
      }
    },
    card() {
      let token = uni.getStorageSync("token");
      const that = this;
      if (!token) {
        uni.showToast({
          title: "请授权登录再操作！",
          duration: 2000,
          icon: "none",
        });
        setTimeout(() => {
          uni.navigateTo({
            url: "/pages/index/index",
          });
        }, 2000);
      } else {
        request({
          url: "h5/userInformation/getNewOtherBusinessCard?",
          method: "POST",
          header: {
            "content-type": "application/json;charset=UTF-8",
            "api-client": "72e0fee8172411ea995200163e05ff66",
            "api-version": this.globalData.apiVersion,
            "Source-Type": 7,
            token: token,
          },
          data: {
            viewUid: this.id,
          },
        }).then((res) => {
          if (res.data.code == 200) {
            that.cardData = res.data.data;
            // 判断是否是手机号
            let phoneH = /^(((1[0-9][0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
            if (phoneH.test(that.cardData.telphone)) {
              that.isPhone = true;
            }
          } else if (res.data.code == 401) {
            uni.showToast({
              title: "登录失效，请重新授权登录！",
              duration: 2000,
              icon: "none",
            });
            setTimeout(() => {
              uni.navigateTo({
                url: "/pages/index/index",
              });
            }, 2000);
          } else {
            uni.showToast({
              title: res.data.msg,
              duration: 2000,
              icon: "none",
            });
          }
        });
      }
    },
    // 组织接口
    qyhList() {
      let token = uni.getStorageSync("token");
      const that = this;
      if (!token) {
        uni.showToast({
          title: "请授权登录再操作！",
          duration: 2000,
          icon: "none",
        });
        setTimeout(() => {
          uni.navigateTo({
            url: "/pages/index/index",
          });
        }, 2000);
      } else {
        request({
          url: "h5/userInformation/getOtherBusinessCardOrg",
          method: "POST",
          header: {
            "content-type": "application/json;charset=UTF-8",
            "api-client": "72e0fee8172411ea995200163e05ff66",
            "api-version": this.globalData.apiVersion,
            "Source-Type": 7,
            token: token,
          },
          data: {
            viewUid: this.id,
            type: 1,
          },
        }).then((res) => {
          if (res.data.code == 200) {
            that.qyhData = res.data.data;
            if (that.tabMargin == "25rpx") {
              if (res.data.data.length > 0) {
                that.dongHeight = res.data.data.length * 218 + "rpx";
              } else {
                that.dongHeight = "400rpx";
              }
            }
          } else if (res.data.code == 401) {
            uni.showToast({
              title: "登录失效，请重新授权登录！",
              duration: 2000,
              icon: "none",
            });
            setTimeout(() => {
              uni.navigateTo({
                url: "/pages/index/index",
              });
            }, 2000);
          } else {
            uni.showToast({
              title: res.data.msg,
              duration: 2000,
              icon: "none",
            });
          }
        });
      }
    },
    // 商协会号接口
    sxhList() {
      let token = uni.getStorageSync("token");
      const that = this;
      if (!token) {
        uni.showToast({
          title: "请授权登录再操作！",
          duration: 2000,
          icon: "none",
        });
        setTimeout(() => {
          uni.navigateTo({
            url: "/pages/index/index",
          });
        }, 2000);
      } else {
        request({
          url: "h5/userInformation/getOtherBusinessCardOrg",
          method: "POST",
          header: {
            "content-type": "application/json;charset=UTF-8",
            "api-client": "72e0fee8172411ea995200163e05ff66",
            "api-version": this.globalData.apiVersion,
            "Source-Type": 7,
            token: token,
          },
          data: {
            viewUid: this.id,
            type: 2,
          },
        }).then((res) => {
          if (res.data.code == 200) {
            that.sxhData = res.data.data;
            if (that.tabMargin == "175rpx") {
              if (res.data.data.length > 0) {
                that.dongHeight = res.data.data.length * 218 + "rpx";
              } else {
                that.dongHeight = "400rpx";
              }
            }
          } else if (res.data.code == 401) {
            uni.showToast({
              title: "登录失效，请重新授权登录！",
              duration: 2000,
              icon: "none",
            });
            setTimeout(() => {
              uni.navigateTo({
                url: "/pages/index/index",
              });
            }, 2000);
          } else {
            uni.showToast({
              title: res.data.msg,
              duration: 2000,
              icon: "none",
            });
          }
        });
      }
    },
    // 圈子接口
    qzList() {
      let token = uni.getStorageSync("token");
      const that = this;
      if (!token) {
        uni.showToast({
          title: "请授权登录再操作！",
          duration: 2000,
          icon: "none",
        });
        setTimeout(() => {
          uni.navigateTo({
            url: "/pages/index/index",
          });
        }, 2000);
      } else {
        request({
          url: "h5/userInformation/getOtherBusinessCardOrg",
          method: "POST",
          header: {
            "content-type": "application/json;charset=UTF-8",
            "api-client": "72e0fee8172411ea995200163e05ff66",
            "api-version": this.globalData.apiVersion,
            "Source-Type": 7,
            token: token,
          },
          data: {
            viewUid: this.id,
            type: 3,
          },
        }).then((res) => {
          if (res.data.code == 200) {
            that.qzData = res.data.data;
            if (that.tabMargin == "305rpx") {
              if (res.data.data.length > 0) {
                that.dongHeight = res.data.data.length * 218 + "rpx";
              } else {
                that.dongHeight = "400rpx";
              }
            }
          } else if (res.data.code == 401) {
            uni.showToast({
              title: "登录失效，请重新授权登录！",
              duration: 2000,
              icon: "none",
            });
            setTimeout(() => {
              uni.navigateTo({
                url: "/pages/index/index",
              });
            }, 2000);
          } else {
            uni.showToast({
              title: res.data.msg,
              duration: 2000,
              icon: "none",
            });
          }
        });
      }
    },
    nolookMore() {
      this.is_more = false;
    },
    lookMore() {
      //查看更多
      this.is_more = true;
    },
    quMask() {
      //取消遮罩
      this.is_mask = false;
    },
    goMask(index, orgId) {
      let that = this;
      if (index == 1) {
        this.tishi_ = "是否下载APP，查看更多信息？";
        setTimeout(() => {
          this.is_mask = true;
        }, 100);
      } else if (index == 2) {
        uni.showModal({
          title: "前往APP",
          content: "即将离开微信，打开“一起来往”查看我的企业号",
          confirmText: "允许",
          success: (res) => {
            if (res.confirm) {
              that.goAdd = true;
              uni.setStorageSync("ios", "1");
              uni.showLoading({
                title: "加载中，请稍等~",
              });
              setTimeout(function () {
                uni.hideLoading();
              }, 3000);
              var url = window.location.href.split("&code")[0];
              window.history.pushState({}, 0, url);
              that.openApp.toApps(6, orgId, 7, "", "");
            }
          },
        });
      } else if (index == 3) {
        uni.showModal({
          title: "前往APP",
          content: "即将离开微信，打开“一起来往”查看我的商协会号",
          confirmText: "允许",
          success: (res) => {
            if (res.confirm) {
              uni.setStorageSync("ios", "1");
              that.goAdd = true;
              uni.showLoading({
                title: "加载中，请稍等~",
              });
              setTimeout(function () {
                uni.hideLoading();
              }, 3000);
              var url = window.location.href.split("&code")[0];
              window.history.pushState({}, 0, url);
              that.openApp.toApps(6, orgId, 1, "", "");
            }
          },
        });
      } else {
        that.tishi_ = "是否下载APP，与他开启聊天？";
        that.is_mask = true;
      }
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  padding-bottom: 160rpx;
  padding-top: 92rpx;
}
.top_tou {
  display: flex;
  padding: 0 38rpx;
  width: 750rpx;
  height: 92rpx;
  background: #f8f8f8;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  box-sizing: border-box;
  .left_ {
    image {
      height: 40rpx;
      width: 40rpx;
    }
  }

  .center_ {
    font-size: 36rpx;
    font-family: PingFangSC, PingFangSC-Medium;
    font-weight: 500;
    text-align: center;
    color: #111111;
  }

  .right_ {
    width: 18rpx;
  }
}

.wu_Huo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30rpx 0;

  image {
    width: 320rpx;
    height: 260rpx;
  }

  text {
    font-size: 28rpx;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: rgba(136, 136, 136, 1);
    line-height: 37px;
  }
}

.zheZhao {
  position: fixed;
  z-index: 999;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;

  .modal {
    position: relative;
    background-color: #fff;
    border-radius: 8rpx;
    width: 520rpx;
    height: 300rpx;
    box-sizing: border-box;
    padding-top: 30rpx;

    .header {
      width: 100%;
      text-align: center;
      font-size: 40rpx;
      font-family: PingFang SC;
      font-weight: bold;
    }

    .text {
      font-size: 30rpx;
      font-family: PingFang SC;
      font-weight: 500;
      color: rgba(49, 49, 49, 1);
      width: 100%;
      text-align: center;
      margin-top: 30rpx;
    }

    .btn_ {
      position: absolute;
      bottom: 0;
      height: 85rpx;
      border-top: 2rpx solid #eee;
      width: 100%;
      display: flex;

      view {
        box-sizing: border-box;
        width: 50%;
        height: 85rpx;
        line-height: 85rpx;
        text-align: center;
        font-size: 28rpx;
        font-family: PingFang SC;
        font-weight: 500;
        color: rgba(0, 0, 0, 0.4);

        .right {
          width: 100%;
          height: 100%;
        }
      }

      .left {
        border-right: 2rpx solid #eee;
      }
    }
  }
}

.content1 {
  padding: 0 32rpx;
  height: 100%;
  margin-bottom: 40rpx;

  .active {
    display: block;
    width: 50rpx;
    height: 4rpx;
    background-color: #0074d9;
  }

  .qz {
    display: flex;
    align-items: center;
    margin: 0 auto;
    margin-bottom: 20rpx;
    width: 676rpx;
    height: 198rpx;
    background: #ffffff;
    box-shadow: 5rpx 5rpx 5rpx 0rpx rgba(0, 0, 0, 0.08),
      -5rpx -5rpx 5rpx 0rpx rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 40rpx 31rpx;
    box-sizing: border-box;
    position: relative;
    .mc {
      width: 676rpx;
      height: 198rpx;
      position: absolute;
      top: 0;
      left: 0;
      opacity: 0;
      z-index: 99;
    }
    .left {
      width: 120rpx;
      height: 120rpx;
      border-radius: 50%;
      display: flex;
      align-items: center;
      overflow: hidden;
      flex-shrink: 0;
      margin-right: 28rpx;

      image {
        width: 100%;
        height: 100%;
      }
    }

    .right {
      height: 110rpx;
      display: flex;
      flex-direction: column;
      justify-content: space-around;

      .title {
        font-size: 32rpx;
        font-family: PingFang SC;
        font-weight: bold;
        color: #333333;
        line-height: 46rpx;
      }

      .redu {
        margin-top: 5rpx;
        font-size: 26rpx;
        font-family: PingFang SC;
        font-weight: 400;
        color: #888888;
      }
    }
  }
}

.xiding {
  position: -webkit-sticky;
  position: sticky;
  top: 90rpx;
  z-index: 99;
  background-color: #ffffff;
  padding: 15rpx;

  .shezhi {
    position: absolute;
    right: 10rpx;
    top: 15rpx;
    color: #0074d9;
    font-size: 30rpx;
  }
}

.tab {
  display: flex;
  margin-bottom: 15rpx;

  view {
    margin-right: 30rpx;
    color: #333333;
    font-size: 34rpx;
    font-weight: 500;
  }

  .isactive {
    font-size: 35rpx;
    font-weight: bold;
  }
}

.no_list {
  width: 100%;
  text-align: center;
  padding: 38rpx 0;
  font-size: 30rpx;
  font-family: PingFang SC;
  font-weight: 500;
  color: #999999;
  line-height: 22rpx;
}

.foot_btn {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 750rpx;
  height: 120rpx;
  background-color: #fff;
  z-index: 99;

  .xian {
    height: 10rpx;
    background-color: #f7f7fa;
  }

  .btn {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 40rpx;
    padding-top: 15rpx;
  }

  .btn_ {
    width: 42%;
    height: 74rpx;
    background: #f65451;
    border-radius: 37rpx;
    text-align: center;
    line-height: 74rpx;
    font-size: 30rpx;
    font-family: PingFang SC;
    font-weight: 500;
    color: #fefefe;
  }

  .btn3_ {
    background: linear-gradient(-63deg, #1672eb 0%, #3a9cff 100%);
  }

  .btn4_ {
    width: 86%;
  }

  .btn_1 {
    width: 42%;
    height: 74rpx;
    background: #62ba46;
    border-radius: 37rpx;
    text-align: center;
    line-height: 74rpx;
    font-size: 30rpx;
    font-family: PingFang SC;
    font-weight: 500;
    color: #fefefe;
  }

  .btn_2 {
    width: 86%;
  }

  .btn5_ {
    background: linear-gradient(-63deg, #1672eb 0%, #3a9cff 100%);
  }
}

.main .top {
  width: 750rpx;
  height: 377rpx;
  background: url(../../imges/mingpianb.png) no-repeat center center;
  background-size: 100%;
  position: relative;
}

.content {
  padding: 0 32rpx;
  position: relative;
  top: 67rpx;

  .xiaoxi {
    width: 48rpx;
    height: 46rpx;
    position: absolute;
    top: 46rpx;
    right: 84rpx;

    image {
      width: 100%;
      height: 100%;
    }
  }

  .one {
    width: 686rpx;
    background: #ffffff;
    box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.16);
    border-radius: 10rpx;
    padding: 0 40rpx;
    box-sizing: border-box;

    .shang {
      padding: 33rpx 0;
      border-bottom: 2rpx solid #eee;
      display: flex;
      align-items: center;

      .left {
        width: 130rpx;
        height: 130rpx;
        border-radius: 50%;
        display: flex;
        align-items: center;
        margin-right: 36rpx;
        position: relative;

        .image {
          width: 100%;
          height: 100%;
          border-radius: 50%;
        }

        .xing {
          width: 29rpx;
          height: 28rpx;
          position: absolute;
          bottom: -18rpx;
          left: 78rpx;
        }

        .dengji {
          height: 28rpx;
          width: 48rpx;
          text-align: center;
          line-height: 28rpx;
          font-size: 23rpx;
          font-family: Source Han Sans CN;
          font-weight: 400;
          font-style: italic;
          color: #fdf9f1;
          font-style: italic;
          background-color: #dab780;
          position: absolute;
          left: 22rpx;
          bottom: -18rpx;
          border-radius: 8rpx;
        }
      }

      .right {
        position: relative;
        bottom: -10rpx;
        height: 130rpx;
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        .name {
          font-size: 38rpx;
          font-family: PingFang SC;
          font-weight: bold;
          color: #141414;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 1;
          overflow: hidden;
          width: 350rpx;
        }

        .firm {
          font-size: 26rpx;
          font-family: PingFang SC;
          font-weight: 500;
          color: #9f9f9f;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 1;
          overflow: hidden;
          width: 350rpx;
        }

        .zhiwei {
          font-size: 26rpx;
          font-family: PingFang SC;
          font-weight: 500;
          color: #9f9f9f;
        }
      }
    }
  }

  .row {
    display: flex;
    align-items: center;
    margin-top: 30rpx;

    > .img1 {
      width: 26rpx;
      height: 26rpx;
    }

    > .img2 {
      width: 25rpx;
      height: 29rpx;
    }

    > .img3 {
      width: 26rpx;
      height: 20rpx;
    }

    > .img4 {
      width: 28rpx;
      height: 28rpx;
    }

    > .img5 {
      width: 27rpx;
      height: 26rpx;
    }

    .text {
      display: inline-block;
      margin-left: 20rpx;
      font-size: 26rpx;
      font-family: PingFang SC;
      font-weight: 500;
      color: #333333;
      display: flex;
      align-items: center;
      text {
        display: inline-block;
        font-size: 26rpx;
        font-family: PingFang SC;
        font-weight: 500;
        color: #2168eb;
        margin-left: 20rpx;
        max-width: 448rpx;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
      }
    }
  }

  .row1 {
    position: relative;
    top: -10rpx;
  }

  .row2 {
    display: flex;
    justify-content: space-between;
    margin-top: 30rpx;
    box-sizing: border-box;
    .img {
      width: 118rpx;
      height: 28rpx;
      font-size: 26rpx;
      font-family: PingFang SC;
      font-weight: 500;
      color: #333333;
      display: flex;
      align-items: center;
      margin-right: 20rpx;

      image {
        width: 27rpx;
        height: 26rpx;
        margin-right: 20rpx;
      }

      text {
        // width: 70rpx;
      }
    }

    > .text {
      margin-top: -3rpx;
      width: 468rpx;
      display: flex;
      flex: 1;
      font-size: 26rpx;
      font-family: PingFang SC;
      font-weight: 500;
      color: #333333;
      display: -webkit-box;
      overflow: hidden;
      white-space: normal !important;
      text-overflow: ellipsis;
      word-wrap: break-word;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
    }
  }

  .zhankai {
    width: 26rpx;
    height: 15rpx;
    margin-left: 580rpx;
    position: relative;
    top: -38rpx;

    image {
      width: 100%;
      height: 100%;
    }
  }

  .footer_ {
    margin-top: 10rpx;
    width: 100%;
    border-top: 2rpx solid #eee;
    display: flex;
    padding: 12rpx 0;
    height: 66rpx;

    .left,
    .right {
      display: flex;
      align-items: center;
      justify-content: center;

      image {
        display: inline-block;
        width: 22rpx;
        height: 26rpx;
        margin-right: 8rpx;
      }

      text-align: center;
      width: 50%;
      font-size: 28rpx;
      font-family: PingFang SC;
      font-weight: bold;
      color: #333333;

      text {
        display: inline-block;
        line-height: 62rpx;
      }
    }

    .left {
      border-right: 2rpx solid #eee;
    }
  }
}

.duoList {
  height: 100%;
  margin-top: 230rpx;
}

.duoList1 {
  height: 100%;
  margin-top: 380rpx;
}
.duoList2 {
  height: 100%;
  margin-top: 440rpx;
}

.list {
  margin-top: 50rpx;
  padding: 0 33rpx;

  &:first-child {
    margin-top: 0;
  }

  .name {
    font-size: 36rpx;
    font-family: PingFang SC;
    font-weight: bold;
    color: #333333;
  }

  .item {
    display: flex;
    margin-top: 20rpx;
    width: 686rpx;
    height: 198rpx;
    background: #ffffff;
    box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.16);
    border-radius: 10rpx;
    padding: 40rpx 31rpx;
    box-sizing: border-box;
    align-items: center;

    .left {
      width: 120rpx;
      height: 120rpx;
      border-radius: 50%;
      display: flex;
      align-items: center;
      overflow: hidden;
      flex-shrink: 0;
      margin-right: 28rpx;

      image {
        width: 100%;
        height: 100%;
      }
    }

    .right {
      height: 110rpx;
      display: flex;
      flex-direction: column;
      justify-content: space-around;

      .title {
        font-size: 32rpx;
        font-family: PingFang SC;
        font-weight: bold;
        color: #333333;
        line-height: 46rpx;
      }

      .redu {
        margin-top: 5rpx;
        font-size: 26rpx;
        font-family: PingFang SC;
        font-weight: 400;
        color: #888888;
      }
    }
  }
}
</style>
